#include "VOFA.h"

float temp[2];
uint8_t tempData[12] = {0,0,0,0,0,0,0,0,0,0,0x80,0x7F};

void vofa(void)
{
	  temp[0]=clarke1.As;//IdLoop.Ref;//Encoder.ElecAngle;//SpeedLoop.Ref;//DT.ib;//SysPara.IdFilter;//
	  temp[1]=clarke1.Bs;//PWM_Calc.UCMP;//IdLoop.Fdb;	//SysPara.debug[8];//flux.FluxPLL.qAngleOut;//SpeedLoop.Fdb;//DT.ic;//DT.DTAngle;//SysPara.IdFilter;//SysPara.IqFilter;
		memcpy(tempData, (uint8_t *)&temp, sizeof(temp));
		HAL_UART_Transmit_DMA(&huart3,(uint8_t *)tempData,12);
}

int fputc(int ch, FILE *f)
{
 while ((USART3->ISR & 0X40) == 0); 
 USART3->TDR = (uint8_t)ch; 
 return ch; 
}


